package com.atde._05_behavioral_design_patterns.observer.internetweather;


/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._05_behavioral_design_patterns.observer.internetweather
 * @Author: Del
 * @CreateTime: 2025-06-29  19:44
 * @Description: 测试 天气预报设计方案1 - 普通方案
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        // 创建接入方 currentConditions
        CurrentConditions currentConditions = new CurrentConditions();

        // 创建 WeatherData 并将接入方 currentConditions 对象，加入到 WeatherData 的观察者集合中
        WeatherData weatherData = new WeatherData(currentConditions);
        weatherData.setData(10f, 100f, 30f);
        System.out.println("--------------------------------------------------");


        weatherData.setData(20f, 200f, 40f);
    }
}
